"""
@File    :   no_introduction.py
@Time    :   2024/03/28 22:25:23
@Author  :   Qrj
@Email   :   923207736@qq.com
@description   :   无需引入其他依赖(全局的no_introduction.py下的依赖项不包含在内)的依赖
"""

from typing import Annotated

from fastapi import Body, Query


class GetOAuth2ClientIDDependencies:
    """获取OAuth2客户端ID的依赖类"""

    @staticmethod
    async def from_body(
        client_id: Annotated[
            str, Body(..., min_length=1, max_length=255, description="客户端编号")
        ],
    ) -> str:
        return client_id

    @staticmethod
    async def from_query(
        client_id: Annotated[
            str, Query(..., min_length=1, max_length=255, description="客户端编号")
        ],
    ) -> str:
        return client_id
